﻿using System;
using IQIGame.Onigao.Game;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;

namespace IQIGame.Onigao.GamePlay
{
    [Serializable]
    public class CriwareAudioClip : PlayableAsset, ITimelineClipAsset
    {
        [SerializeField] public int audioID;
        
        public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
        {
            var rPlayable = CriwareAudioBehaviour.Create(graph, owner);
            CriwareAudioBehaviour clone = rPlayable.GetBehaviour();
            clone.audioID = this.audioID;
            return rPlayable;
        }

        public ClipCaps clipCaps
        {
            get => ClipCaps.None;
        }
    }
}